#ifndef UI_LAYERBOX_H
#define UI_LAYERBOX_H

#include <qcombobox.h>

#include "pf_layerlist.h"
#include "lx_String.h"
#include "gui_export.h"

/**
 * A combobox for choosing a layer.
 */
class GUI_EXPORT UI_LayerBox: public QComboBox {
    Q_OBJECT

public:
    UI_LayerBox(QWidget* parent=0, const char* name=0);
    virtual ~UI_LayerBox();

    PF_Layer* getLayer() {
        return currentLayer;
    }
    void setLayer(PF_Layer& layer);
    void setLayer(PF_String& layer);

    void init(PF_LayerList& layerList, bool showByBlock, bool showUnchanged);

	bool isUnchanged() {
		return unchanged;
	}

private slots:
    void slotLayerChanged(int index);

signals:
    void layerChanged(PF_Layer* layer);

private:
    PF_LayerList* layerList;
    PF_Layer* currentLayer;
    bool showByBlock;
    bool showUnchanged;
	bool unchanged;
};

#endif

